package com.newtouch.rabbbitmq;

import org.springframework.amqp.AmqpRejectAndDontRequeueException;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import java.util.logging.Logger;

/**
 * Created by Administrator on 2017/8/30.
 */

@Component
@RabbitListener(queues = "hello")
public class Receiver {

    private final Logger logg = Logger.getLogger("Receiver.class");

    @RabbitHandler
    public void process(String hello){

        logg.info("接收到的消息内容{}："+hello);
    }
}
